﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;

namespace RWSBeeldbank.Common
{
    class Constants
    {
        // Conversion size to TileWidth of images
        public const string TILE_WIDTH_SOURCE = "MediaService/";
        public const string TILE_WIDTH_TARGET1 = "MediaService/[250x250-";
        public const string TILE_WIDTH_TARGET2 = "]";
        public const string LARGE_WIDTH_TARGET = "MediaService/[1366-";
        public const string HTTP = "http://";
        public const string HTTPS = "https://";
        public const string WEBSITEBASE = "https://beeldbank.rws.nl";
        public const string FEEDBASE = "https://beeldbank.rws.nl"; //http://localhost:1024 https://beeldbank.rws.nl
        public const string PHOTO_URL = "/Photos/";
        public const string VIDEO_URL = "/Videos/";
        public const string VIDEO_EXTENSION = ".mp4";
        public const string IMAGE_EXTENSION = ".jpg";
        public const string COPYRIGHTBASE = WEBSITEBASE + ", Rijkswaterstaat";
        public const string DIRECTLINKBASE = WEBSITEBASE + "/MediaObject/Details/";
        public const string NEWCOLLECTIONID = "53";
        public const string NEWCOLLECTIONNAME = "Nieuw vandaag";
        public const string NEWCOLLECTIONDESCRIPTION = "Nieuwe media die vandaag zijn toegevoegd aan het archief.";
        public const string NEWCOLLECTIONIMAGEPATH = "ms-appx:///Images/" + NEWCOLLECTIONID + ".jpg";

        public const string SEARCHCOLLECTIONID = "99";
        public const string SEARCHCOLLECTIONNAME = "Zoekresultaat";
        public const string SEARCHCOLLECTIONDESCRIPTION = "Gevonden items";
        public const string SEARCHCOLLECTIONIMAGEPATH = "ms-appx:///Images/" + NEWCOLLECTIONID + ".jpg";

        public const string RATINGALREADYRATED = "U heeft dit item (al) beoordeeld met ";
        public const string RATINGALREADYRATED2 = " sterren";

        public const string SRC_LOCATION_PHOTO = WEBSITEBASE + PHOTO_URL;
        public const string SRC_LOCATION_VIDEO = WEBSITEBASE + VIDEO_URL;

        public const int MAX_RESPONSE_BUFFERSIZE = 1024 * 1024; // Read up to 1 MB of data

        public const int INITIAL_NR_ITEMS = 6; // First amount of items that will be fetched per collection;
        public const int PAGE_SIZE = 20; // Maximum amount of items that will be fetched per page;
        public const int SEARCH_PAGE_SIZE = 200; // Maximum amount of items that will be fetched per page with search;
        public const int FLIPVIEW_PAGE_SIZE = 10; // Maximum amount of items that will be fetched when the flipview reaches the end of the present collection.
        public const int MAX_NR_ITEMS = 5000; // Maximum amount of items that will be fetched per collection;

        public const int ITEM_TYPE_ANALOG = 16; // Definition value for analog media items
        public const int ITEM_TYPE_DIGITAL = 19; // Definition value for digital media items
        public const int ITEM_TYPE_VIDEO = 20; // Definition value for video items

        public const string TILE_SIZE_DIGITAL = "250x250";
        public const string TILE_SIZE_ANALOG = "600";

        public static Color SETTINGS_BACKGROUND = Color.FromArgb(255, 0, 30, 78);
        public static Color SETTINGS_FOREGROUND = Color.FromArgb(255, 255, 255, 255);

        public const int FEED_CACHE_TIME_SECONDS = 3600; // Keep a feed cached for x seconds (14400 = 4 days)
        public const int FEED_DELETE_CACHE_TIME_DAYS = 2; // Delete all cache files older than x days
    }
}
